Use nearest zero-based pool name for expansion #48
+24
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue summary
After tenant expansion and decommission, further expansion is not always possible using the MinIO tenant console.
As an example, in a deployment with
pool-0
andpool-1
, afterpool-0
decommission, a subsequent expansion by the console tries and fails to createpool-1
which already exists.This is because the MinIO tenant console automatically names pools based on the number of pools in existence. If there is
1
pool, then the logic will try to createpool-1
- which may be incorrect as shown above. This logic needs to consider examining the pools already in existence before determining which pool name to use.Test summary
Reproduce issue on master
Test 0 - As reported by user, Create using Console, Expand using Console, Decommission pool-0, Expand tenant using Console
Fix on improve-poolname-search branch
Test 1 - Create tenant using console, Expand using kubectl-minio, Decommission
pool-0
, Expand tenant using ConsoleTest 2 - Create tenant using kubectl-minio, Expand using console, Decommission
0pool
, Expand tenant using ConsoleTest 3 - As reported by user, Create tenant using Console, Expand tenant using Console, Decommission
pool-0
, Expand tenant using ConsoleTest 4 - Create tenant using kubectl, Expand tenant using kubectl, Decommission
pool-1
, Expand tenant using ConsoleVerbose tests here:
https://github.com/allanrogerr/public/wiki/operator%E2%80%901785